home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6521 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  994 b 

  1. Path: dns.plano.net!news    
  2. From: jdunn@plano.net
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Newbie Q: references
  5. Date: 9 Feb 1996 03:50:50 GMT
  6. Organization: Plano Internet
  7. Message-ID: <4fegaq$gvc@dns.plano.net>
  8. References: <4feg4e$ctc@dns.plano.net>
  9. Reply-To: jdunn@plano.net
  10. NNTP-Posting-Host: aux28.plano.net
  11. X-Newsreader: IBM NewsReader/2 v1.09
  12.  
  13. I'll take another pass at this with hard returns:
  14. As I understand what happens under the compiler covers, when we pass a reference
  15. into a method (function), what actually happens is that the compiler creates another
  16. entry in it's symbol table to alias the same address location. This new alias has a 
  17. different scope and is scoped only in the function it is passed to. 
  18. Does that mean that the compiler actually does not put any thing at all on the stack 
  19. for the reference, but just allows you to use the reference inside the function's scope?
  20. Is this the real reason for references ?
  21. That they take no overhead in the function calls and returns ?
  22.  
  23.